#include <reg52.h>
#define uint unsigned int
void delay1s();
void main()
{
	while(1)
	{
		P1=0x01;	
		delay1s();
		P1=0x02;	
		delay1s();
		P1=0x04;
		delay1s();
		P1=0x08;
		delay1s();
		P1=0x10;
		delay1s();
		P1=0x20;
		delay1s();
		P1=0x40;
		delay1s();
		P1=0x80;
		delay1s();
		P1=0x40;
		delay1s();
		P1=0x20;
		delay1s();
		P1=0x10;
		delay1s();
		P1=0x08;
		delay1s();
		P1=0x04;
		delay1s();
		P1=0x02;
		delay1s();
	}	
}
void delay1s()
{
	uint i,j;
	for(i=100;i>0;i--)		
		for(j=100;j>0;j--);
}